package com.yanqu.road.entity.activity.stelesoul.config;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_s_activity_stonesoul_map")
public class SteleSoulMapConfig {

        @FieldTypeAnnotation(desc = "活动id", select = true)
        private int activityId;
        @FieldTypeAnnotation(desc = "阶段")
        private int period;
        @FieldTypeAnnotation(desc = "圈")
        private int circle;
        @FieldTypeAnnotation(desc = "彩蛋格数量")
        private int surprisePlaid;
        @FieldTypeAnnotation(desc = "奖励")
        private String reward;
        @FieldTypeAnnotation(desc = "彩蛋格奖励")
        private String surpriseReward;
        @FieldTypeAnnotation(desc = "参数1")
        private String paramOne;
        @FieldTypeAnnotation(desc = "参数2")
        private String paramTwo;

        private List<Integer> paramOneList;
        private List<Integer> paramTwoList;

        private List<List<Property>> rewardList = new ArrayList<>();
        private List<List<Property>> surpriseRewardList = new ArrayList<>();

        public void init() {
                paramOneList = StringUtils.stringToIntegerList(paramOne, ";");
                paramTwoList = StringUtils.stringToIntegerList(paramTwo, ";");
        }

        public int getActivityId() {
                return activityId;
        }

        public void setActivityId(int activityId) {
                this.activityId = activityId;
        }

        public int getPeriod() {
                return period;
        }

        public void setPeriod(int period) {
                this.period = period;
        }

        public int getCircle() {
                return circle;
        }

        public void setCircle(int circle) {
                this.circle = circle;
        }

        public int getSurprisePlaid() {
                return surprisePlaid;
        }

        public void setSurprisePlaid(int surprisePlaid) {
                this.surprisePlaid = surprisePlaid;
        }

        public String getReward() {
                return reward;
        }

        public void setReward(String reward) {
                this.reward = reward;
                this.rewardList = PropertyHelper.parseNewStringToPropertyList(reward);
        }

        public String getSurpriseReward() {
                return surpriseReward;
        }

        public void setSurpriseReward(String surpriseReward) {
                this.surpriseReward = surpriseReward;
                this.surpriseRewardList = PropertyHelper.parseNewStringToPropertyList(surpriseReward);
        }

        public String getParamOne() {
                return paramOne;
        }

        public void setParamOne(String paramOne) {
                this.paramOne = paramOne;
        }

        public String getParamTwo() {
                return paramTwo;
        }

        public void setParamTwo(String paramTwo) {
                this.paramTwo = paramTwo;
        }

        public List<Integer> getParamTwoList() {
                return paramTwoList;
        }

        public void setParamTwoList(List<Integer> paramTwoList) {
                this.paramTwoList = paramTwoList;
        }

        public List<Integer> getParamOneList() {
                return paramOneList;
        }

        public void setParamOneList(List<Integer> paramOneList) {
                this.paramOneList = paramOneList;
        }

        public List<List<Property>> getRewardList() {
                return rewardList;
        }

        public List<List<Property>> getSurpriseRewardList() {
                return surpriseRewardList;
        }
}
